
#include "stdafx.h"
#include "WicStreamProvider.h"

CWicStreamProvider::CWicStreamProvider()
{
    m_pIWICStreamProvider = NULL;
}

CWicStreamProvider::~CWicStreamProvider()
{
    if(m_pIWICStreamProvider)
    {
        m_pIWICStreamProvider->Release();
    }
    m_pIWICStreamProvider = NULL;
}

CWicStreamProvider::CWicStreamProvider(CWicStreamProvider const & objStreamProvider)
{
    m_pIWICStreamProvider = objStreamProvider.m_pIWICStreamProvider;
    m_pIWICStreamProvider->AddRef();
}

CWicStreamProvider& CWicStreamProvider::operator=(CWicStreamProvider const & objStreamProvider)
{
    if(m_pIWICStreamProvider)
    {
        m_pIWICStreamProvider->Release();
    }
    m_pIWICStreamProvider = objStreamProvider.m_pIWICStreamProvider;
    m_pIWICStreamProvider->AddRef();
    return *this;
}
